package com.bodu.exchange.controller;

import com.bodu.core.entity.result.Result;
import com.bodu.exchange.client.ExchangeBillTypeClient;
import com.bodu.exchange.entity.request.ExchangeBillTypeRequest;
import com.bodu.exchange.entity.vo.ExchangeBillTypeVo;
import com.bodu.exchange.service.ExchangeBillTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@RestController
@Api(value = "类别API", tags = "类别API")
@RequestMapping("api/exchange-bill-type")
public class ExchangeBillTypeApiController {
    
    private final ExchangeBillTypeClient exchangeBillTypeClient;

    public ExchangeBillTypeApiController(ExchangeBillTypeClient exchangeBillTypeClient) {
        this.exchangeBillTypeClient = exchangeBillTypeClient;
    }

    @ApiModelProperty("查询类别")
    @PostMapping("billTypeList")
    public Result<ExchangeBillTypeVo> billTypeList(@RequestBody ExchangeBillTypeRequest exchangeBillTypeRequest) {
        return exchangeBillTypeClient.billTypeList(exchangeBillTypeRequest);
    }
}
